/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const logisticsRouter = {
  path: '/logistics',
  component: Layout,
  name: '配送管理',
  meta: {
    title: '配送管理',
    subtitle: '配送',
    icon: 'distrbution'
  },
  children: [
    // 模拟三级路由
    {
      path: '',
      component: Layout,
      name: '日常业务',
      meta: { title: '日常业务', subtitle: '业务', icon: 'menu_shipping'},
      childrens: [
        {
          path: '/picking/list',
          meta: { title: '装车单', subtitle:'装车',icon: 'menu_material', permissions: ['picking.query'] }
        },
        {
          path: '/shipping/list',
          meta: { title: '送货单', subtitle:'送货',icon: 'menu_material', permissions: ['shipping-list'],color:'true'},
        },
        {
          path: '/returns/list',
          meta: { title: '退货单', subtitle:'退货',icon: 'menu_material', permissions: ['return.query'] }
        },
      ]
    },
    {
      path: '',
      component: Layout,
      name: '基础设置',
      meta: { title: '基础设置', subtitle: '基础', icon: 'menu_shipping'},
      childrens: [
          {
            path: '/car/list',
            meta: { title: '车辆管理',subtitle:'车辆', icon: 'menu_community', permissions: ['car.query'] }
          },
          {
            path: '/shippingLine/list',
            meta: { title: '送货线路',subtitle:'线路', icon: 'menu_community', permissions: ['shippingLine.query'] }
          },
          {
            path: '/mapLine/list',
            meta: { title: '区域设置',subtitle:'区域', icon: 'menu_supplier',permissions:['mapLine.query']}
          },
      ]
    },
    {
        path: '',
        component: Layout,
        name: '社群管理',
        meta: { title: '社群管理', subtitle: '社群', icon: 'menu_shipping'},
        childrens: [
            {
                path: '/communityStore/list',
                meta: { title: '社区门店',subtitle:'社区店', icon: 'menu_community', permissions: ['sysMch.query'] }
              },
              {
                path: '/teamLeader/list',
                meta: { title: '社区团长',subtitle:'团长', icon: 'menu_community', permissions: ['teamLeader.query'] }
              },
        ]
      },

     // {
     //   path: '',
     //   component: Layout,
     //   name: '配送查询',
     //   meta: { title: '配送查询', subtitle: '查询', icon: 'menu_shipping'},
     //   childrens: [
     //     {
     //        path: '/supplyCountReport/list',
     //        meta: { title: '送货汇总表',subtitle:'查询', icon: 'menu_shipping', permissions: ['supplyCountReport.query'] }
     //     }
     //  ]
     // },

    // 路由注册
    {
        path: '/car/list',
        component: () => import('@/views/car/list'),
        name: 'car-list',
        meta: { title: '车辆管理',subtitle:'车辆', icon: 'menu_community', permissions: ['car.query'] },
        hidden: true
      },
      {
        path: '/car/add',
        component: () => import('@/views/car/add'),
        name: 'car-add',
        meta: { title: '新增车辆', icon: 'menu_community' },
        hidden: true
      },
      {
        path: '/car/edit',
        component: () => import('@/views/car/edit'),
        name: 'car-edit',
        meta: { title: '修改车辆', icon: 'menu_community' },
        hidden: true
      },
      {
        path: '/shippingLine/list',
        component: () => import('@/views/shippingLine/list'),
        name: 'shippingLine-list',
        meta: { title: '送货线路',subtitle:'线路', icon: 'menu_community', permissions: ['shippingLine.query'] },
        hidden: true
      },
      {
        path: '/shippingLine/add',
        component: () => import('@/views/shippingLine/add'),
        name: 'shippingLine-add',
        meta: { title: '新增送货线路', icon: 'menu_community' },
        hidden: true
      },
      {
        path: '/shippingLine/edit',
        component: () => import('@/views/shippingLine/edit'),
        name: 'shippingLine-edit',
        meta: { title: '修改送货线路', icon: 'menu_community' },
        hidden: true
      },
      {
        path: '/mapLine/list',
        component: () => import('@/views/mapLine/list'),
        name: 'mapLine-list',
        meta: { title: '区域设置',subtitle:'区域', icon: 'menu_supplier',permissions:['mapLine.query'] },
        hidden: true
      },
      {
        path: '/mapLine/add',
        component: () => import('@/views/mapLine/add'),
        name: 'mapLine-add',
        meta: { title: '新增围栏', icon: 'menu_supplier' },
        hidden: true
      },
      {
        path: '/mapLine/edit',
        component: () => import('@/views/mapLine/edit'),
        name: 'mapLine-edit',
        meta: { title: '修改围栏', icon: 'menu_supplier' },
        hidden: true
      },
      {
        path: '/communityStore/list',
        component: () => import('@/views/communityStore/list'),
        name: 'communityStore-list',
        meta: { title: '社区门店',subtitle:'社区店', icon: 'menu_community', permissions: ['sysMch.query'] },
        hidden: true
      },
      {
        path: '/communityStore/add',
        component: () => import('@/views/communityStore/add'),
        name: 'communityStore-add',
        meta: { title: '新增社区店', icon: 'menu_community' },
        hidden: true
      },
      {
        path: '/communityStore/edit',
        component: () => import('@/views/communityStore/edit'),
        name: 'communityStore-edit',
        meta: { title: '修改社区店', icon: 'menu_community' },
        hidden: true
      },
      {
        path: '/teamLeader/list',
        component: () => import('@/views/teamLeader/list'),
        name: 'teamLeader-list',
        meta: { title: '社区团长',subtitle:'团长', icon: 'menu_community', permissions: ['teamLeader.query'] },
        hidden: true
      },
      {
        path: '/teamLeader/add',
        component: () => import('@/views/teamLeader/add'),
        name: 'teamLeader-add',
        meta: { title: '新增团长', icon: 'menu_community' },
        hidden: true
      },
      {
        path: '/teamLeader/edit',
        component: () => import('@/views/teamLeader/edit'),
        name: 'teamLeader-edit',
        meta: { title: '修改团长', icon: 'menu_community' },
        hidden: true
      },
      {
        path: '/shipping/list',
        component: () => import('@/views/shipping/list'),
        name: 'shipping-list',
        meta: { title: '送货单', subtitle:'送货',icon: 'menu_material', permissions: ['shipping-list']},
        hidden: true
      },
      {
        path: '/shipping/view',
        component: () => import('@/views/shipping/view'),
        name: 'shipping-view',
        meta: { title: '送货单详情', icon: 'menu_material' },
        hidden: true
      },
      {
        path: '/shipping/batchShipping',
        component: () => import('../../views/shipping/batchShipping'),
        name: 'shipping-batchShipping',
        meta: { title: '批量发货', icon: 'menu_material' },
        hidden: true
      },
      {
        path: '/shipping/import',
        component: () => import('../../views/shipping/import'),
        name: 'shipping-import',
        meta: { title: '套餐导入', icon: 'menu_material' },
        hidden: true
      },
    {
      path: '/returns/list',
      component: () => import('@/views/returns/list'),
      name: 'returns-list',
      meta: { title: '退货单', subtitle:'退货',icon: 'menu_material', permissions: ['return.query'] },
      hidden: true
    },
     {
        path: '/returns/view',
        component: () => import('@/views/returns/view'),
        name: 'returns-view',
        meta: { title: '退货单详情', icon: 'menu_material' },
        hidden: true
      },
    {
      path: '/supplyCountReport/list',
      component: () => import('@/views/supplyCountReport/list'),
      name: 'supplyCountReport-list',
      meta: { title: '送货汇总表',subtitle:'送货', icon: 'menu_report',permissions:['supplyCountReport.query']},
      hidden: true
    },
    {
       path: '/supplyCountReport/detailslist',
       component: () => import('@/views/supplyCountReport/detailslist'),
       name: 'supplyCountReport-detailslist',
       meta: { title: '送货明细表',subtitle:'详情', icon: 'menu_report',},
       hidden: true
    },

    {
      path: '/picking/list',
      component: () => import('@/views/picking/list'),
      name: 'picking-list',
      meta: { title: '装车单',subtitle:'装车', icon: 'menu_pick',},
      hidden: true
    },
    {
      path: '/picking/add',
      component: () => import('@/views/picking/add'),
      name: 'picking-add',
      meta: { title: '新增装车单',subtitle:'新增装车单', icon: 'menu_pick',},
      hidden: true
    },
    //     {
    //   path: '/picking/edit',
    //   component: () => import('@/views/picking/edit'),
    //   name: 'picking-edit',
    //   meta: { title: '编辑装车单',subtitle:'编辑装车单', icon: 'menu_pick',},
    //   hidden: true
    // },
        {
      path: '/picking/view',
      component: () => import('@/views/picking/view'),
      name: 'picking-view',
      meta: { title: '装车单详情',subtitle:'装车单详情', icon: 'menu_pick',},
      hidden: true
    },
  ]

}
export default logisticsRouter
